package com.easwift.qsp.das.xgy;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: TODO
 * @author: huameng
 * @date: 2020年09月10日 10:34
 */
public class DeviceConfing {

    public static void main(String[] args) {
        jieMi();
    }
    public static void jieMi(){
        String captureUrl = "https://open.ys7.com/api/lapp/device/encrypt/off";
        String token="at.3ge8ssj3dhii7825602tz0itbkstq36a-1vwzyst7lp-0jo1lhz-vlgfepyda";
        String deviceSerial = "E48894226";
        String validateCode="GNMCUV";
        Map<String, Object> param1 = new HashMap<String, Object>();
        param1.put("accessToken", token);
        param1.put("deviceSerial", deviceSerial);
        param1.put("validateCode", validateCode);
        //请求
        String result = HttpUtil.post(captureUrl, param1);
        JSONObject jsonObject1 = JSONUtil.parseObj(result);
        String msg= jsonObject1.get("msg").toString();
        System.out.println(msg);
    }
}
